package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.UploadManageMapper;
import com.gxa.saas.pojo.Upload;
import com.gxa.saas.service.UploadManageService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.UUID;


@Service
@Transactional(rollbackFor = Throwable.class)

public class UploadManageServiceImpl implements UploadManageService {

    @Autowired
    UploadManageMapper uploadMapper;
    @Override
    public List<Upload> selectAll() {
        return uploadMapper.selectAll();
    }

    @Override
    public List<Upload> selectByPage(Integer page, Integer size) {
        return uploadMapper.selectByPage(size*(page-1),size);
    }

    @Override
    public List<Upload> selectByName(Map map) {
        return uploadMapper.selectByName(map);
    }

    @Override
    public void delete(Integer id) {
      uploadMapper.delete(id);
    }

    @Override
    public Upload selectById(Integer id) {
        return uploadMapper.selectById(id);
    }

}
